package com.my.zxsyd.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.my.zxsyd.entity.Admin;
import com.my.zxsyd.mapper.AdminMapper;
import com.my.zxsyd.service.IAdminService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 管理员表 服务实现类
 * </p>
 *
 * @author lbk
 * @since 2024-02-19
 */
@Service
public class AdminServiceImpl extends ServiceImpl<AdminMapper, Admin> implements IAdminService {

    /**
     * 管理员登录
     * @param account
     * @param pwd
     * @return
     */
    @Override
    public Admin login(String account, String pwd) {
        QueryWrapper<Admin> queryWrapper=new QueryWrapper<>();
        queryWrapper.eq("account",account);
        queryWrapper.eq("pwd",pwd);
        Admin admin=this.getOne(queryWrapper);
        return admin;
    }


}
